/// @description 鼠标左键点击-切换状态
// You can write your code in this editor

// Inherit the parent event
event_inherited();

//切换状态
checked = !checked;

//实现单选功能
if(checked)
{
	if(view_parent!=noone)
	{
		//循环遍历子view
		var size = ds_list_size(view_parent.view_child_list);
		for(var i=0;i<size;i++)
		{
			var _child = ds_list_find_value(view_parent.view_child_list, i);
			//子view
			with(_child)
			{
				if(_child!=other.id)
				_child.checked = false;
			}
		}
	}
	
	//调用回调函数
	if(view_check_onChange!=undefined)
	{
		script_execute(view_check_onChange);
	}
}

